<?php

use Encore\Admin\Auth\Database\Menu;
use Illuminate\Database\Seeder;

class MenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run()
    {
        $local = [
            [
                'id' => 32,
                'parent_id' => 0,
                'order' => 48,
                'title' => 'Helpers',
                'icon' => 'fa-gears',
                'uri' => '',
            ],
            [
                'id' => 33,
                'parent_id' => 32,
                'order' => 49,
                'title' => 'Scaffold',
                'icon' => 'fa-keyboard-o',
                'uri' => 'helpers/scaffold',
            ],
            [
                'id' => 34,
                'parent_id' => 32,
                'order' => 50,
                'title' => 'Database terminal',
                'icon' => 'fa-database',
                'uri' => 'helpers/terminal/database',
            ],
            [
                'id' => 35,
                'parent_id' => 32,
                'order' => 51,
                'title' => 'Laravel artisan',
                'icon' => 'fa-terminal',
                'uri' => 'helpers/terminal/artisan',
            ],
            [
                'id' => 36,
                'parent_id' => 32,
                'order' => 52,
                'title' => 'Routes',
                'icon' => 'fa-list-alt',
                'uri' => 'helpers/routes',
            ],
        ];

        $data = [
            [
                'id' => 1,
                'parent_id' => 0,
                'order' => 1,
                'title' => '首页',
                'icon' => 'fa-home',
                'uri' => '/',
            ], [
                'id' => 2,
                'parent_id' => 0,
                'order' => 41,
                'title' => '管理',
                'icon' => 'fa-tasks',
                'uri' => '',
            ], [
                'id' => 3,
                'parent_id' => 2,
                'order' => 43,
                'title' => '用户',
                'icon' => 'fa-users',
                'uri' => 'auth/users',
            ], [
                'id' => 4,
                'parent_id' => 2,
                'order' => 44,
                'title' => '角色',
                'icon' => 'fa-user',
                'uri' => 'auth/roles',
            ], [
                'id' => 5,
                'parent_id' => 2,
                'order' => 45,
                'title' => '权限',
                'icon' => 'fa-ban',
                'uri' => 'auth/permissions',
            ], [
                'id' => 6,
                'parent_id' => 2,
                'order' => 46,
                'title' => '菜单',
                'icon' => 'fa-bars',
                'uri' => 'auth/menu',
            ], [
                'id' => 7,
                'parent_id' => 2,
                'order' => 47,
                'title' => '操作日志',
                'icon' => 'fa-history',
                'uri' => 'auth/logs',
            ], [
                'id' => 10,
                'parent_id' => 0,
                'order' => 13,
                'title' => '玩家相关',
                'icon' => 'fa-users',
                'uri' => '',
            ], [
                'id' => 11,
                'parent_id' => 10,
                'order' => 14,
                'title' => '玩家角色',
                'icon' => 'fa-user',
                'uri' => '/playerRole',
            ], [
                'id' => 12,
                'parent_id' => 0,
                'order' => 29,
                'title' => '充值',
                'icon' => 'fa-jpy',
                'uri' => '',
            ], [
                'id' => 13,
                'parent_id' => 12,
                'order' => 30,
                'title' => '充值订单',
                'icon' => 'fa-calendar',
                'uri' => '/orderList',
            ], [
                'id' => 14,
                'parent_id' => 2,
                'order' => 42,
                'title' => '定时任务',
                'icon' => 'fa-clock-o',
                'uri' => 'scheduling',
            ], [
                'id' => 15,
                'parent_id' => 0,
                'order' => 2,
                'title' => '数据统计',
                'icon' => 'fa-bar-chart',
                'uri' => '',
            ], [
                'id' => 16,
                'parent_id' => 0,
                'order' => 35,
                'title' => '服务器管理',
                'icon' => 'fa-bars',
                'uri' => '',
            ], [
                'id' => 17,
                'parent_id' => 16,
                'order' => 36,
                'title' => '区服列表',
                'icon' => 'fa-bars',
                'uri' => '/server',
            ], [
                'id' => 18,
                'parent_id' => 16,
                'order' => 37,
                'title' => '开服计划',
                'icon' => 'fa-paper-plane-o',
                'uri' => 'openServerPlane',
            ], [
                'id' => 19,
                'parent_id' => 16,
                'order' => 38,
                'title' => '合服',
                'icon' => 'fa-code-fork',
                'uri' => 'mergeServer',
            ], [
                'id' => 20,
                'parent_id' => 16,
                'order' => 39,
                'title' => '状态',
                'icon' => 'fa-hourglass-half',
                'uri' => 'serverStatus',
            ], [
                'id' => 21,
                'parent_id' => 16,
                'order' => 40,
                'title' => '游戏大区',
                'icon' => 'fa-adjust',
                'uri' => '/region/',
            ], [
                'id' => 22,
                'parent_id' => 12,
                'order' => 32,
                'title' => '渠道管理',
                'icon' => 'fa-cubes',
                'uri' => 'channel',
            ], [
                'id' => 23,
                'parent_id' => 12,
                'order' => 31,
                'title' => '充值排行',
                'icon' => 'fa-stop-circle-o',
                'uri' => 'orderTop',
            ], [
                'id' => 24,
                'parent_id' => 12,
                'order' => 33,
                'title' => '充值挡位',
                'icon' => 'fa-level-up',
                'uri' => 'chargeLevel',
            ], [
                'id' => 25,
                'parent_id' => 12,
                'order' => 34,
                'title' => '模拟充值',
                'icon' => 'fa-bolt',
                'uri' => 'orderReplete',
            ], [
                'id' => 26,
                'parent_id' => 10,
                'order' => 15,
                'title' => '玩家账号',
                'icon' => 'fa-user-md',
                'uri' => 'account',
            ], [
                'id' => 27,
                'parent_id' => 10,
                'order' => 16,
                'title' => '角色禁言日志',
                'icon' => 'fa-clone',
                'uri' => 'roleBannedLog',
            ], [
                'id' => 28,
                'parent_id' => 10,
                'order' => 17,
                'title' => '角色禁封日志',
                'icon' => 'fa-clone',
                'uri' => 'roleBanLog',
            ], [
                'id' => 29,
                'parent_id' => 10,
                'order' => 18,
                'title' => '账号禁封日志',
                'icon' => 'fa-clone',
                'uri' => 'accountLog',
            ], [
                'id' => 30,
                'parent_id' => 0,
                'order' => 21,
                'title' => 'GM工具',
                'icon' => 'fa-magic',
                'uri' => '',
            ], [
                'id' => 31,
                'parent_id' => 30,
                'order' => 22,
                'title' => '邮件奖励',
                'icon' => 'fa-envelope-o',
                'uri' => 'mailReward',
            ], [
                'id' => 37,
                'parent_id' => 30,
                'order' => 23,
                'title' => '道具管理',
                'icon' => 'fa-dashboard',
                'uri' => 'itemManage',
            ], [
                'id' => 38,
                'parent_id' => 30,
                'order' => 24,
                'title' => '加VIP等级',
                'icon' => 'fa-plus',
                'uri' => 'addVipLevel',
            ], [
                'id' => 39,
                'parent_id' => 30,
                'order' => 25,
                'title' => '公告',
                'icon' => 'fa-commenting-o',
                'uri' => 'notice',
            ], [
                'id' => 40,
                'parent_id' => 30,
                'order' => 26,
                'title' => '登录公告',
                'icon' => 'fa-comments',
                'uri' => 'loginNotice',
            ], [
                'id' => 41,
                'parent_id' => 30,
                'order' => 27,
                'title' => '激活码',
                'icon' => 'fa-codepen',
                'uri' => 'giftCode',
            ], [
                'id' => 42,
                'parent_id' => 15,
                'order' => 3,
                'title' => '基础数据',
                'icon' => 'fa-cube',
                'uri' => 'data/statdata',
            ], [
                'id' => 43,
                'parent_id' => 15,
                'order' => 11,
                'title' => '等级分布',
                'icon' => 'fa-signal',
                'uri' => 'levelDist',
            ], [
                'id' => 44,
                'parent_id' => 10,
                'order' => 19,
                'title' => '游戏事件',
                'icon' => 'fa-bolt',
                'uri' => 'events',
            ], [
                'id' => 46,
                'parent_id' => 15,
                'order' => 4,
                'title' => '用户留存',
                'icon' => 'fa-user',
                'uri' => 'data/remain',
            ], [
                'id' => 48,
                'parent_id' => 15,
                'order' => 10,
                'title' => '充值统计',
                'icon' => 'fa-money',
                'uri' => 'data/orders',
            ], [
                'id' => 49,
                'parent_id' => 15,
                'order' => 9,
                'title' => '资源消耗',
                'icon' => 'fa-delicious',
                'uri' => 'data/resource',
            ], [
                'id' => 50,
                'parent_id' => 15,
                'order' => 8,
                'title' => '资源获取',
                'icon' => 'fa-diamond',
                'uri' => 'data/getResource',
            ], [
                'id' => 51,
                'parent_id' => 15,
                'order' => 12,
                'title' => '交易中心',
                'icon' => 'fa-paypal',
                'uri' => 'data/tradingCenter',
            ], [
                'id' => 52,
                'parent_id' => 30,
                'order' => 28,
                'title' => '白名单',
                'icon' => 'fa-file-o',
                'uri' => 'whiteList',
            ], [
                'id' => 53,
                'parent_id' => 15,
                'order' => 5,
                'title' => '付费分析LTV',
                'icon' => 'fa-cny',
                'uri' => 'data/payForAnaly',
            ], [
                'id' => 54,
                'parent_id' => 15,
                'order' => 6,
                'title' => 'VIP用户留存',
                'icon' => 'fa-user-times',
                'uri' => 'data/vipAnaly',
            ], [
                'id' => 55,
                'parent_id' => 10,
                'order' => 20,
                'title' => '聊天日志',
                'icon' => 'fa-bars',
                'uri' => 'player/chat',
            ], [
                'id' => 56,
                'parent_id' => 15,
                'order' => 7,
                'title' => 'VIP用户排行',
                'icon' => 'fa-star',
                'uri' => 'data/vipUserRank',
            ], [
                'id' => 57,
                'parent_id' => 10,
                'order' => 0,
                'title' => '激活码日志',
                'icon' => 'fa-bars',
                'uri' => 'player/giftCodeLog',
            ], [
                'id' => 58,
                'parent_id' => 30,
                'order' => 0,
                'title' => '活动配置',
                'icon' => 'fa-gamepad',
                'uri' => 'gm/activity',
            ],
            [
                'id' => 59,
                'parent_id' => 15,
                'order' => 0,
                'title' => '玩家行为',
                'icon' => 'fa-child',
                'uri' => 'data/behavior',
            ],
        ];
        Menu::truncate();
        Menu::insert($data);
        if (env('APP_ENV' == 'local')) {
            Menu::insert($local);
        }
    }
}
